package com.elink.enginerring.file.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import com.elink.enginerring.common.BaseCo;
import com.elink.enginerring.file.co.FileCo;
import com.elink.enginerring.file.entity.File;

public interface FileMapper {
	int deleteByPrimaryKey(String fileId);
	int insert(File record);

	int insertSelective(File record);

	File selectByPrimaryKey(String fileId);
	
	int updateByPrimaryKeySelective(File record);

	int updateByPrimaryKey(File record);
	
	List<File> selectList(@Param("co")FileCo co);

	int selectCount(@Param("co")FileCo co);

	@Delete("delete  from file where find_in_set(file_id,#{ids})")
	void del(@Param("ids") String ids);
	
	File selectInfo(String fileId);
	
	List<File> selectFileListByCondition(@Param("co")BaseCo co, @Param("type")int type, @Param("count")int count, @Param("joinTable")String joinTable,
			@Param("flag")boolean flag,@Param("userId")String userId,@Param("fileName")String fileName);
	
	int selectCountOfFileListByCondition(@Param("type")int type, @Param("count")int count, @Param("joinTable")String joinTable,
			@Param("flag")boolean flag,@Param("userId")String userId,@Param("fileName")String fileName);
	
	int selectCountByCondition(@Param("type")int type, @Param("joinTable")String joinTable);
	
	List<File> selectSkillFile(@Param("co")BaseCo co, @Param("skillId")String skillId,@Param("keyWord")String keyWord);
	
	int selectCountOfSkillFile(@Param("skillId")String skillId,@Param("keyWord")String keyWord);
	
	File selectByFilePath(@Param("path")String path);
	
}